#ifndef PATHMAP_HPP
#define PATHMAP_HPP

#define FLT_MAX         3.402823466e+38F        /* max value */

#include "MicroPather/micropather.h"
#include <QVector>

#include <iostream>

using namespace std;

class PathMap : public micropather::Graph{
    public:
        PathMap();

        virtual float LeastCostEstimate( void* nodeStart, void* nodeEnd );
        virtual void AdjacentCost( void* node, std::vector< micropather::StateCost > *neighbors );
        virtual void PrintStateInfo(void *state){}

        void fillMap(QVector<int> map, int width, int height);

        int passable(int nx, int ny);
        void* XYToNode( int x, int y );
        void NodeToXY( void* node, int* x, int* y );

        void setIsFlying(bool isFlying = true){
            mIsFlying = isFlying;
        }


    private:
        QVector<int> mMap;
        int mMapWidth;
        int mMapHeight;

        bool mIsFlying;
};

#endif // PATHMAP_HPP
